package com.bee.commons.utils;

import org.apache.commons.codec.binary.Base64;

/**
 * @author Damin.yang
 * @date 2019/08/17 9:55
 */
public class Base64Util {

    /**
     * base64加密
     * @param args
     * @return
     */
    public static String encode(String args) {
        return new String(Base64.encodeBase64(args.getBytes()));
    }

    /**
     * base64加密
     * @param args
     * @return
     */
    public static String decode(String args) {
        return new String(Base64.decodeBase64(args.getBytes()));
    }
}
